﻿<!DOCTYPE html>
<HTML>
<HEAD>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="description" content="Web Control for Decoder">
	<meta name="author"	content="Cogent">
	<meta http-equiv="Pragma" content="no-cache">
	<meta http-equiv="Cache-Control" content="no-cache">
	<meta http-equiv="Expires" content="0">
	<title>DEBUG</title>
	<script	src="jQueryAssets/jquery-1.11.1.min.js"></script>
</HEAD>

<style>
.BTN
{
	font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
	font-size:1.2em;
	border-radius: 6px 6px 6px 6px;
	border:1px solid #992222;
	background:#FF3333;
	color:#FFEEEE;
	margin-right: 30px;
	margin-top: 5px;
	margin-left: 25px;
	height: 35px;
	width: 120px
}

.text1
{
	font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
	font-size:1.2em;
	margin-right: 30px;
	margin-top: 10px;
	height: 35px;
	width: 120px
}

.text2
{
	font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
	font-size:1.2em;
	height: 30px;
	width: 40%;
	border-radius: 6px 6px 6px 6px;
	border: 1px solid #ffaaaa;
	color: #888888;
	margin-top:5px;
	margin-right: 5px;
	margin-bottom: 5px;
	margin-left: 5px;
	padding-left: 5px
}
</style>

<BODY>
	<div id="content">
		<label class="text1" style="width: 30px; height: 30px; float: left">cmd</label>
		<input type="text" id="cmd" class="text2" value="" style="width: 60%; height: 30px; float: left" />
		<button	type="button" id="ok" class="BTN" style="float: left">OK</button>
		<br>
		<br>
		<p id="result"></p>
	<div/>

	<script	type="text/javascript">

$('#ok').click(function () {
    var tmp = $("#cmd").val();
    //console.log(tmp);
    if(tmp == "")
		return;

    $("#result").html(tmp);
    $.get("/cgi-bin/exec_cmd.cgi", {cmd:tmp}, function(str){
		$("#result").html(str);
	});
});

	</script>

</BODY>
</HTML>
